<template>
  <div id="app">
    <el-row v-if="username">
      <Header />
      <router-view />
    </el-row>
    <el-row v-else>
      <Login />
    </el-row>
  </div>
</template>

<script>
import Login from './views/Login'
import Header from './components/Header/Header'
export default {
  name: 'App',
  components: {
    Login,
    Header
  },
  data:function(){
    var data = {
      }
      return data
  },
  computed: {
    username () {
        return this.$store.state.user.name
      }
    }
}
</script>

<style lang="less">
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin:0;
  padding:0;
}
</style>
